#ifndef ENGINE_H
#define ENGINE_H
#include "main.h"

#include "Image.h"
#include "GameObject.h"
#include "Player.h"

#include "common/Singleton.h"
#include "common/Math.h"
//#include <fstream>



namespace jfw
{
    class Engine : public jfw::Singleton<Engine>
    {
        public:
            Engine();

            //bool LoadSettings(std::string m_sFilename,std::string m_sSeparator);
            //bool Open();

            bool Open(int iWidth, int iHeight, int iBits, const char* sTitle, float m_fTimeStep);
            void Run();

            void Close();
            virtual ~Engine();

            sf::RenderWindow* pApp;

        protected:
        private:
            void Update(float m_fDeltaTime);
            void Draw();

            sf::Input Input;
            sf::Event Event;
            sf::Clock Clock;

            float fTimeStep;

            /******************/
            jfw::Player test;
            /*****************/

            //std::map<std::string,std::string> Settings;
    };
}
extern jfw::Engine* pEngine;
#endif // ENGINE_H
